package com.daybook.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.daybook.pojo.Order;
import com.daybook.pojo.OrderAndBooks;

public interface OrderMapper {
/*********************用户模块****************************/
	//1.添加订单
	public int insertNewOrderList(@Param(value = "orderList")List<Order> orderList);
	//2.订单
		public List<OrderAndBooks> selectMyOrderList(@Param(value = "startPos")Integer startPos,
	    		@Param(value = "pageSize")Integer pageSize,@Param(value = "uid")Integer uid,
	    		@Param(value = "ostate")Integer ostate);
	//2.2 分页条件数量查询
		int selectCountMyOrderList(@Param(value = "uid")Integer uid,@Param(value = "ostate")Integer ostate);
/*********************公共模块****************************/
	//1.改变订单状态
	public int updateOrderState(@Param(value = "order")Order order);
	
	
		
	
	
/*********************管理员模块****************************/
	//1.所有订单
	public List<OrderAndBooks> selectAllOrderList(Map<String, Object> map);
	//1.2 分页条件数量查询
	int selectCountAllOrderList(Map<String, Object> map);
}
